package bao;

import java.util.Random;
import java.util.Scanner;

public class lei6 {
    public static void main(String[] args) {
        int[] moneys = {11, 666, 188, 520, 9919};
        start(moneys);
    }

    public static void start(int[] moneys) {
        Scanner sc = new Scanner(System.in);
        Random r = new Random();
        for (int i = 0; i < moneys.length; i++) {
            System.out.println("请输入任意内容抽奖");
            sc.next();
            while (true) {
                int index = r.nextInt(moneys.length);
                int money = moneys[index];
                if (money != 0) {
                    System.out.println("恭喜您，您抽中红包：" + money);
                    moneys[index] = 0;
                    break;
                }
            }

        }
        System.out.println("活动结束");
    }
}
